This is related to your "order of blocks" issue from before. It's (largely) a problem with the iterative parser. The syntax highlighting issue is separate and I'll look at that too.