collection_to_capped.cpp takes a database MODE_X lock here, but it can just take collection locks instead.