This is a long-standing bug. We should fix it.
Actually, the baseline code also claims that "masquerader === null" is false. So, this isn't a bug.