This was also fixed in ac29b654a992a4855626fc0b92874d3847914f85 in a
different way. I think the mask definition should be left with 1s
indicating the bits of interest.
See also 87ea496ca768d18e51d8654cbad9cb261a881b1b.
This reverts commit 2433f17e7341d6afcda24d395d0b93c50a37b7b1.