Test to prove bug

Test to prove bug in DataQuery::applyRelation