The battle of yellow tavern was not in 1863, but in may 1864.
Which explains how Stuart died after Gettysburg and not before.
Thanks