You said it only appears sometimes and it fixes itself on refreshes, right? I think that would rule out a mistake in the templates somewhere (which would've meant that it's consistently failing on some pages).
I wonder what the HTML output looks like when you can reproduce it. Do the <a> elements for the links not get output at all (more likely) or are they hidden somehow?
I'm not really sure on why this would happen, to be honest.