Remove bitmask from within for loop.

This makes the loop use a uint16_t for the bitmask variable instead of
uint8_t.