Actually looking at this further this extra code shouldn't be needed. `namefunc` should be responsible for assigning unique names, see:
https://github.com/wutron/compbio/blob/yjw-libs/compbio/coal.py#L896-L902