Ignore meaningless tokens while parsing. Fixes #414 and #622