Dragging from list misplaced elements

I have noticed when dragging an element from a list, ie a bootstrap block like footer for instance, into the tree that it misplaces it within the HTML structure.
After running a syntax check I got the error message “HTML should not contain section elements”.
On searching the HTML I found instead of
Footer (closing element)
(closing body tag)
(closing html tag)
It was (closing body tag)
Footer (closing element tag)
(closing html tag)
The bootstrap block was inserted between the body and HTML closing tags. I have had this numerous times on different sites.