I have baked 5 or more maps without a problem before. Now, I don’t know why, I have this error and one of the materials doesn’t bake well (the material with the dependency). I have searched it in the net, and the solution (disconnect the material you are baking onto) doesn’t work for me. The strange thing, it is not always the same material, but changes when blender is reopened.
I have Blender 2.8, and 6 albedos maps to bake into one wall.