When an error is encountered when writing dependencies, this presents a nicer error rather than an ICE. Closes #13517