Patched looping bug.

Only test for null list, not single node list before loop.