It is not guaranteed that with Multires modifier existing there will be CD_MDISPS and CD_GRID_PAINT_MASK custom data layers. Fixes assert in the following scenario: - With default cube, go to edit mode - Add Multires modifier - Remove the Multires modifier