Refactor of ghost_query_method to avoid checking the regex twice for call to method_missing