semantic: Detect aggregates in foreachs, error otherwise.