Fix nesting for tags with no parent.