Removing Redundant Logic Pathways in Polymorphic Circuits