Fixes #5604: Automatically check ordering and $() syntax
Merge pull request #524 from peckpeck/bug_5604/automatically_check_ordering_and_syntax

Fixes #5604: Automatically check ordering and $() syntax