Hardening/compound convop extra tests

Adds a few tests for compound convops operations:
* Query entity by attribute
* Query attribute by valueID

Also fixes bug #323.