Added copy to deterministic ID routines to fix input changing.