This works better:
- combines relevant bits into single state
- silences warnings about duplicate keys
- actually does all the changes on a single run (well, to be verified)