Fix the order of paths at require_dependencies.

ref #1491

/cc @ujifgc @tune