Fix erroneous test dependency detection