@chrispanag the problem is solved now:
As you said, the error was happening when generating a backward link from the linked post to the original post if the original post had a long title.