Safety check for adding element to own parent in superscripted footnote

This should probably be extracted into its own method and used /whenever/ we add one element to another as it just hangs the program otherwise. I've added this as issue #58