some improvements in out-of-order dependency resolution