Moved code to #1171 to make the options cloning universal for all commands