Minor - Fixed issue with WHERE condition in query - refs #6599