It's not ram water...
When the holding tank inlet is next to the hull instead of the certerline of the boat, heeling to that side can allow the the contents of even a half full tank to flow into the head discharge line and back to the toilet. The joker valve in the toilet can't prevent a little seepage, if it weren't so worn out that it might as well not even be there (and may not be), but it SHOULD prevent the kind of flood you're having. If the tank vent is also on same side (whether ON the end or side or at the top on that side) of the tank, I suspect waste is also overflowing out the vent when you're heeled hard to that side.The cure, other than relocating the inlet and vent fittings on the tank, is a new joker valve in the toilet (in fact, if the joker valve is any indication a complete rebuild is prob'ly WAAAY overdue) AND a vented loop in the head discharge line that's at least 8-12" inches above the waterline at any angle of heel. The best place for it is immediately after the toilet...iow, come out of the toilet straight up (this may require replacing a straight head discharge fitting with a 90 degree fitting, which you can get from the toilet mfr) to the loop mounted on the bulkhead behind it, back down to a 90 degree inline fitting...and on to the tank. It'll require a few feet of new hose to get up to the loop and back down to the inline 90...then connect the existing head discharge hose to that 90. When installing a new tank, ALWAYS spec the inlet and vent fittings locations to put them toward the centerline. When the boat heels to one side, waste runs aways from them...when heeled to the other side, the hoses are then running uphill. No spills out the vent or waste flowing back into the head discharge line.