Bug 863288 - Add sanity checks and error logging for bitmap decoding. r=mfinkle