We need to use the custom data copy function that skips mesh-only attributes like the hide status attributes, the generic material index attribute, etc. Otherwise the BMesh has those attributes which conflict with their builtin counterparts.
const Scene*