Improve hasMany dirty checking