Fix issues with updating inline editor when not visible

This addresses the two issues mentioned in #5643 (the main bug and the one I noted in the comment). Note that to reproduce the original issue, you have to have at least three rules in the inline editor.

Note also that #5896 isn't caused by this pull request (it reproduces in sprint 33).