hasBoundPort() now verifies that the port is bound by the child or one of its children
Added timeouts to prevent infinite loops