These three patches removed what seemed obvious to me

...and things still seem to work (no console errors anyway).