This was also fixed in ac29b654a9 in a different way. I think the mask definition should be left with 1s indicating the bits of interest. This reverts commit e11185d47d.
ac29b654a9
e11185d47d