Fix for findAllRefs on identifiers starting with 2+ underscores

Fixes #1233.
Discussed offline