Inherited queries are now supported when accessing cursor by index

Attached unit test would fail without proposed fix.