handle duplicate code promotion