Enabling Initial State check on buttons shared across action map causes dynamic bitfield assert fail

I have a UI and a gameplay action map. Both gameplay map and UI have ESC button to toggle pause. In code I directly subscribe to action assets:

GameplayPauseAction.performed += gameplayState.Pause;
UIPauseAction.performed += pauseState.UnPause;

gameplayState.Pause; instantly changes the inputmap to UI. However, UIPauseAction then fires causing pauseState.UnPause. This results in the game going gamplay->Pause then returning back to gameplaystate despite pressing ESC once. From what I understand, InitialStateCheck is suppose to prevent this, not firing the event if the action map(UI map in this case) wasn’t active at the moment the button was pressed. However I get an error instead:


In DynamicBitField:

Am I doing something wrong? If so, what is the correct approach for handling buttons that are shared across mutually exclusive inputmaps?

I’m using playerinput to change action maps if it matters.