Fix error message on cyclic dependencies or dependency resolve failure