Now correctly deals with nested footnotes