add logging for all the places we call resolve_state_groups. my kingdom for a backtrace that actually works.