- if ((direction == Output) && (iface->getDirection() == Output)) return true;
- if ((direction == InOut) && (iface->getDirection() == InOut)) return true;
+ if ((direction == Output) && (iface->getDirection() == Output) && (purpose == iface->getPurpose())) return true;
+ if ((direction == InOut) && (iface->getDirection() == InOut) && (purpose == iface->getPurpose())) return true;