Fix error introduced by 5343a3830, refs #973

The variables could be nil and then cloning it would throw an error.
Merge remote-tracking branch 'upstream/master'