Fixing problem when no page matches the given path

When no page matches the given path in the 'findInPages(path)',
an array containing 'site.pages' would be returned, which causes
an error later in the 'generateAnchorHtml(page)' method when
calling the 'real_page' attribute on the given parameter.