Eliminate redundant cloning when possible