Make `StateMonitor` use the explicitly defined namespace of its source group. Important when recording a subexpression referring to external variables.