[MNG-5613] Avoid NPE when dependency graph creation fails