Fixes hasMany records being duplicated after payload returns from server

There is an edge case where a hasMany record gets duplicated (same ID).
This commit fixes that by not allowing duplicated records.

I need this badly for my app.