Replace anyref with IsAggregateRoot