Fixed a bug in MCSimple::ReplaceID. Some elements were skipped.