fixes #6275 - idempotence needs clone of original data and to handle *_port

@witlessbird, @GregSutcliffe if you can test & review asap, I'd like to merge this to avoid tripping people up