Kinematic platform squeezing bodies

I'm building a game where the user can draw lines (line segments are boxes, static bodies) to interact with the world. Some levels have moving platforms (kinematic bodies).

Here's my issue: Sometimes the user can draw a line that traps dynamic bodies between the line and a moving platform. When the bodies get trapped, the game hangs.

I tried using the ContactListener to test the impulses on the dynamic bodies against a threshold, and removing the bodies if the impulses are too high. However, when the platform is moving slowly, the impulses on the bodies never get very high, and if I lower the threshold the bodies are too fragile for other aspects of the game.

Does anyone have any recommendations for solving this issue? I'm using the Flash port 2.1a.
I wonder if you could look at all the impulses acting on a body and check for situations with opposing impulses, while the body is not actually moving.

The hanging problem sounds like a bug in the port...?
Yeah, the hanging problem might be a bug in the port, I'm going to look into that a bit. Something in the vicinity of SolveTOI().

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