Fixed bug #37131.
At the very end of the function JOIN_CACHE_BKA::join_matching_records
the the fields of the last record written into the join buffer must
be copied back into the record buffers.
It is easy to show that if not to do it for the fields from the tables
that precede that the join table to which the join buffer is attached
the returned result set in many cases will be wrong.