Fixes Issue 6717 - Better diagnostic on wrong ASM end token.