Running the importCollection command with a collection with a hidden index results in an error from the validation code:
Validated index spec { v: 2, hidden: true, key: { xxx: 1 }, name: "xxx_1" } does not match original { v: 2, key: { xxx: 1 }, name: "xxx_1", hidden: true })
This is apparently because we are using woCompare in the validate logic here:
https://github.com/10gen/mongo-enterprise-modules/blob/master/src/live_import/import_collection.cpp#L272
but I'm not sure why the order of the fields is changing after prepareSpecForCreate().