Toggling show_expanded set the WM_KEYMAP_UPDATE_RECONFIGURE flag. Disable this as it's only a display option in the UI.