fix parse() with undefined variables

`parse()` would not recognize strings where undefined (ignored) variables are possible.

I've updated the tests to cover (until Level 3) these cases

PS: sorry about this poorly-written PR, but it's 3h30am here and I'm really tired :dizzy_face: