Fix exiting namespace when it's the last child (#223)

Fixes https://github.com/tildeio/htmlbars/issues/223 (which came from https://github.com/emberjs/ember.js/issues/9971 )