Added logic to avoid validating already-validated queries. refs #451