Parser::replaceInternalLinks: fix batching