SSDT Publish failing with an error without even running any statements
Turns out the GO statement segregated the successful code from the remainder, which indeed contains an erroneous statement (as per the error message), and so the error was thrown during syntax validation.

By taking the line number of the GO statement and adding the line number shown in the error message (which is really the offset in the batch), I found a bad MERGE statement, since double-clicking the error message in the SSDT publish results takes me to a random spot in the publish script.

So it was caused by statement batching, with syntax validation finally running on a deployment script (that is excluded from building with the SQL project).