Fixed nested tag issue!

A bug caused the entire document to go wonky because an infinite loop added endlessly. Fixed that and now the problem of adding , , in nested manner + partial node selection is finally working! Will clean up and hope that this is the last of it.