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 )
This should also be changed, right (and lastNode variable deleted)?  And a test to cover it?  I'll look into what integration points are.