Fix ranges for quantifiers and nonstandard references. Fixes #62 and #63