Do not loop over more than one property when checking middleware.
Fix delta issues. has many relations should diff correctly.