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 )
So this was obviously broken if your test was failing before these changes.

The intent was to conserve changing the namespace at the end of a template.