plugins_url() incorrectly returning wp-include directory

Masonry is already registered by WordPress.

From wp-includes/script-loader.php:

// Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
// It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
$scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array(), '3.1.2', 1 );
$scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2', 1 );

So your first wp_enqueue_script() does not register masonry again. WordPress uses the already existing resource. plugins_url() is not related, its value isn’t even used.

error code: 523