dedupe command construction in build loop