Made _instances, _refs and _isDefined more conventional

Wrote supporting unit tests for _isDefined, and discovered that, by
current QL syntax, it *can't* work in dotted position.