utils.rewriteIDs: option to run it without being recursive