Lint: check more invariants across occurence & binding sites
This implements SPJ's suggestions from !10641 (comment 503980), and is based off that MR -- the only addition here is the last commit.
I am not sure how to add a test for this extra lint check. I would be happy to do so if someone can suggest how.