Fixes #2511: make sure cluster is removed from polymorphicClusterIds