Fix ambiguous ID assignments