Thanks to uramer for pointing out the bugs created by the previous use of shallowCopy() and noting that deepCopy() would prevent them.
Thanks to uramer for pointing out the bugs created by the previous use of shallowCopy() and noting that deepCopy() would prevent them.