Fixing missing handler.hasQuery that would break segment capturing.