Tests and error handling in footnotes rearranging