robustified duplicate & increment

it was throwing an error if the numbered object you were trying to
create already existed, so now it keeps counting up until it finds a
number that doesn't yet exist and uses that