Fixed copier logic to perform matching before transformation