Fix std::set::erase incompatibility

Sorry - not quite as concise!