Fixed the query functions not comparing data values at all for their return values.

Also made them accept RValue as well and added some test cases for them
and for the overloader bug i fixed last time.