Fix reference issue in top sort of ocamldep dependencies.