My head hurts...B just buys any old share and returns it to A. He doesn't have to return the specific share he received from A. So it wouldn't impact D's, or anyone else's short position directly.
Of course it can be more insidious. A loans share to B, B sells it to A, A loans it to B, B sells it to A, lather, rinse, repeat.