Rewrite ids in source