avoid an NPE when one of the root level views winds up being null

I think there was a race condition that made this occur, but it only happened once so far.