Fix for MemoryError when window_intersect.query_terms() returns None. #306