To answer my own question.
You need to be in Freeze mode. Although I set Frz and Halt I forgot to wait for the controller to enter freeze mode.
However if you do, and the controller is in Freeze mode, then you can read RXIMR.
I think that it is ugly and highly inconvenient that one needs to be in freeze mode to read these masks but there you are, we live in an imperfect world but at least I have a workaround for the problem.