Issue #2283999 by drastik: Fixed Element div not allowed as child of element legend (patch inside).