dynamic body acts "static" to other body

Hi, my googling skills have failed me here on the best way to implement this behavior in Box2D.

Basically, I have two dynamic bodies (and they both need to be dynamic to have gravity, respond to external forces, etc). However, one of the bodies needs to be immovable (Body A) when the other (Body B) collides with it.

Here's what I've tried so far.

1) In PreSolve, I disabled the contact and slam the velocity of the Body B to zero. This works when Body B collides from the side, but if it's sitting on top of body A, gravity causes it to sink into Body A.

2) In PreSolve, I temporarily turn Body A into a static body and revert it back in the postsolve. All sorts of problems with this: not only does changing the body type wipe all existing kinematic state, but BodyA sinks into the ground and pops back up noticeable when transiting back to a dynamic body. This also has some crashing behavior that I've seen others mention.

3) Change all bodies to kinematic and directly pick-and-choose when velocities get applied to what. Yeah, this is fairly extreme - it sidesteps all the collision resolution goodness that Box2D has, and I haven't found the normal vectors in contact events to be accurate all the time.

Really, what I want to be able to do is alter the manifold in PreSolve such that BodyA receives no contact, but BodyB still bounces off, but distinct contact data for each fixture doesn't seem to be the model that the Manifold is working with. Any ideas?

Thanks!
Trile
You might be able to do it by having a kinematic body shadow the one which is not supposed to be bumpable. I tried it recently and it worked ok, but my case may be simpler than yours.
Basically the idea is to create a kinematic body with the same fixtures as body A, then do a SetTransform + SetLinearVelocity + SetAngularVelocity on it every time step, taking the position and velocities from the original dynamic body.
You will need to play with the collision filters so that body B' fixtures will collide with the kinematic's fixtures, but the fixtures of the original two dynamic bodies should not collide.
How funny, I just tried that very idea last night and was going to post here that it worked pretty well. Thanks!

Original thread: https://box2d.org/forum/viewtopic.php?t=7501