without_temporal_condition: use rewhere rather than unscope, since the latter
causes an arel regression error on #to_sql in some cases.