Use valid bpc value in LoadPalette() and ContinueToLoadMask()