fixed bid/mask bug with upside down slabs

Upside down slabs were not found in the BlockIdentifier cache, as the
.mask was not applied before bid calculation.