These changes avoid false-positive syntax-check failure, and also make the resulting diagnostics more comprehensible.