Removes useless path rewriting