Fixed handling of constant values and port swapping in subcircuit library
Fixed mine test case for subcircuit library