Support for query references