Simplify the handling of duplicate region ids