buildorder.py: handle the case when more than one dependency type is set (#1555)