Actually there is at least one version of a slide valve (d valve) type engine that does do this. The slew and crowd engines on the Marion steam shovels had a central valve that reversed the flow of steam/exhaust passages, and a double layer slide valve that allowed it to work. Here is a cross section with how they did it:
In that pic, the steam is coming in the left hand hole (red in the yellow block) and being directed to the right hand end of the cylinder, pushing the piston left, and the exhaust is directed to the grey hole.
Then, in this next pic, the slide valve is moved to the right, putting the steam to the left of the piston, and the exhaust going out the right of the piston. There is steam pressure all around the slide valve, holding it down. When the center valve is in the other direction, steam would be directed to the grey hole and exhaust to the red hole, reversing the direction the piston is pushed.
This is not a theoretical thing I thought up, this is actually how the Marion engines worked.