Thanks laurocaetano.

As I said initially in #6659 I wasn't sure it was incorrect behaviour. I suppose I was just surprised that validation had side effects and that setting foo_id did not clear a previously set foo association. I couldn't at the time find documentation that stated such behaviour but even if nothing else exists (I haven't searched recently) at least this issue is here to refer to.