Issue #142: refactored replaceSelectedObjectsWithCopies()