Caused by own rBff3d535bc2a6309 - since we now only write the exact amount of layers needed to store saved customdata, we have to adjust CustomData->maxlayer too. Otherwise, on next read, customdata code believes it has more layers allocated than actual number. Issue reported by Campbell over IRC, thanks.