The "msrset/msrclr" instructions placed after a branch instruction were executed, even though a branch was taken as shown below:
bnei r3, label
msrset r0, 0x2
This problem has been fixed in the latest EDK 8.1i Service Pack, available at:
The first service pack containing the fix is EDK 8.1i Service Pack 1.