Page 399 in the endnotes had this to say on the 51st Virginia infantry regiment.
"The remnants of the 51st Va joined Gordon's units sometime after 2 March 1865, and lost their battle flag 25 March 1865, at Ft.Stedman."
His source was "Davis, 51st Va, page 42."
Hope that helps someone,
Have a good day
Shawn Prouty