Cleaner code for when nodes are incorrectly configured

Easier to read version of a previous bugfix.

Change-Id: Iff5836ede8ecc86ef0ad6e741b1cb7f193da7a6a
Merge "Cleaner code for when nodes are incorrectly configured"