Fix for bug: extraneous links registered for last entry in index. For instance, for python documentation index, all links in footer would get attached to `zlib`.