My thought was that this really shouldn't need to be complicated. My suggestion: when displaying a message that has freezeInputs selected, don't change oldInputs. Then, when the message disappears, copy the input state as it was when the message displayed into oldInputs. This may seem more complicated up front, but you only have to do it once.
Or, if that doesn't appeal to you, just copy the current inputs into oldInputs when the message is dismissed. This makes sense in any case, whether the message input handling happens before or after the sprite handling.