The current ad-hoc approach doesn't seem to be working, so this needs to be designed properly. See: 880af6335275d6160547031901ea3eaf16c0769f