why do we need to invalidate when changing relationships? (can we do it for `instanceof` and `defines` only? (these shouldn't really be edited manually like this)