Enable ScopedTypeVariables when parsing rules. Fixes #18.
Add test case for #18.