Fix bug in ls_dependency_by_type