Fix bug where type names could be allowed in some references
Slightly cleaner version of the previous fix
Fix a corner case with array constants
Allow 'RANGE in allocator expressions