Refactored to remove unused nested instructionhandles.