Don't rewrite invited_by_id by another user

Hi!
I faced up with following problem:
* First user create an invitation. This invitation will attached to him
* Second user create an invitation with the same email like the first user. invitation_by_id will rewriting with the second user, but it shouldn't

I think this is a bug and I've attached test+code