eliminate warnings and improve metavariable sanity checking
This parsing is speculative (searching for iterators or macro statements), and thus it should not make warnings that are visible to the user.
Improve metavariable sanity checking to take constraints into account.