Improve printing of node lists

Change-Id: I22ae79694dcaf4006b25f0e13f0b25a796cfa389