In this scene, we see...
But, here, in this next scene we see...
So, is it a big mistake in the movie??
According to the novelization, R2-D2 was indeed with Chewbacca aboard the Falcon, so the first scene must have had some OTHER R2 astromech.
Each time, Chewbacca would wave. Had he been equipped to do so, R2-D2 would have done likewise.
- [From the novelization]
I could be wrong but I believe the character in the top image is shinier, newer (i.e. different) than the one in the bottom image.
During the film, I recall thinking that the character in the top image looked familiar, but couldn't be who you (and I) thought it was. So the next image made sense to me. I had the thought "Oh okay, must have been a different character."
Consider the placement of the individuals in the sending off scene. Front and center are C-3PO and BB-8. Off to the side (and behind another person) is an R2 unit.
One would expect, that if that was R2-D2, he would have been standing in close proximity to the two droids in the middle given R2-D2's importance. That this expectation is not met indicates thats not R2-D2.