Here's a bug: https://github.com/mongodb/mongo/blob/3c1347b07d678297aa1d136e780f461bf1e28c07/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp#L1037
If there are two RecordIds (locInIndex) that are higher than RecordId we're inserting (loc), then the loc will be inserted more than once to the value.
I believe this line should be
if (!insertedLoc && loc < locInIndex)
- is related to
SERVER-16762 Loss of type information for covered queries in WiredTiger
SERVER-16632 Change WiredTiger index key format to no longer use BSON