capture-aware renaming pass