Setting collision filter when already contacted

It seems that changing a collision filter when the bodies already contacted doesn't work. So I have 2 collidable bodies: the "table" and the "box" - table is supporting box. Then I turn off collisions between them (by the means of custom filter), so the table becomes ghost, but it still continues colliding with the box, preventing it to fall down. Is there a way to turn on "ghost" behavior when the objects are already contacted?

P.S.
I've experienced this problem in my project. Haven't reproduced this behavior in TestBed yet.
You have to call the Refilter function.

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