Fixed an expression which led to a KeyError for internal links.