Merge pull request #877 from chrisleishman/experimental-parser

Use then & ifOkThen for semanticCheck control flow
Add additional SemanticChecking tests
Add withScopedState helper
Limit filter var type to collection innerTypes