Generator queries with an empty result set no longer get caught in an infinite loop