Fix: invalid reference to mapper instance in Query and Statement classes