Correctly duplicate rows in the module wizard (see #5657)