overflow bug in multi-index when checking for duplicates