remove obsolete rewrite rule from link resolver
optimize rewriting, some elements were always processed twice