I've replaced this variable with the check on z. There are a few other checks scattered around in other methods, however. Doing a check on z for each doesn't feel right, so I kept the variable. It has been renamed enable_custom_queries, which is hopefully more useful in those instances.