Issue 9526 - ICE when compiling project with unittests

http://d.puremagic.com/issues/show_bug.cgi?id=9526

When markAsNeedingClosure() moves through sx = sx->parent list, it should check for null.