Fixed a bug in instruction duplication.