- if ((direction == Output) && (iface->getDirection() == Output)) return true;\r
- if ((direction == InOut) && (iface->getDirection() == InOut)) return true;\r
+ if ((direction == Output) && (iface->getDirection() == Output) && (purpose == iface->getPurpose())) return true;\r
+ if ((direction == InOut) && (iface->getDirection() == InOut) && (purpose == iface->getPurpose())) return true;\r
+ }\r
+ else if ((getOwner()->isSourceBlock()) && (iface->getOwner()->isTopGroupBlock())) {\r
+ if ((direction == Output) && (iface->getDirection() == Input) && (purpose == iface->getPurpose())) return true;\r