better upstream/downstream support

don't just consider build-trigger upstream, but all upstreams (including join)