Should this program really compile (is the where clause ignored)?

Ah yes, it probably is.

I started this thread because I bumped into this particular issue just now (again as it turns out, this time with Swift 5 / Xcode 10.2 and it's also in the latest dev snapshot (2019-04-10)).

I remember now that I've encountered it before and that it is related to the thread you mentioned, as well as this thread and SR-5440 (which I filed almost two years ago, but it's barely partly fixed, as the bug report is a bit too unfocused).

I've now filed the particular code example above as a separate simpler bug.