Add test for entity first level cache reuse when querying