Shape replacement only on identical instances