I cherry-picked this from master.

This fixes a problem wherein setting my TreeControllers' content to null results in a crash.