Replace Sketch Entities and Maintain References