Bug 866748: isTopLevel shouldn't throw, r=smaug

--HG--
extra : transplant_source : %FDZ%DE6%3Bw%A7%CD%C7%A2%5D%60%7F%B7%2C%92F5%88%08