Workaround for query cache returning Exceptions instead of throwing them