Not much context checking occurs right now. So,
name joe
value
type boolean
name larry
does not generate an error message even though a name element has no meaning in the value context. It should probably be:
name joe
value
type boolean
name larry
which simply makes larry a descendant of joe.
Really, all the elements should be checked for context, but handling name is highest priority IMO.