                 // early exit if it returned true;
                 if ((result && !notFlag) || (!result && notFlag))
                 {
-                    goodQueries[expression] = true;
+                    goodQueries[originalExpression] = true;
                     return true;                    
                 }
             }

            // then we match
            else if (notFlag)
            {
                goodQueries[expression] = true;                
                return true;
            }
        }
        badQueries[expression] = true;
        return false;
    }
    

            {
                if (numExpressions == 1 && !notFlag)
                {
                    goodQueries[originalExpression] = true;
                    return true;                                            
                }
                // bail if "and" and no media features (invalid query)
