Added regression test to check if Resource.query is copied
Fixed regression when using Resource.query for Collection.params