Custard is what's called a "Non-Newtonian Fluid" which means its viscosity is not linear. Ie, if you push twice as hard through custard it tries (say) four times as hard to hold you back. Thus if you put a quick, large pressure on it (a foot stamping down) the custard becomes instantaneously solid.
Also, the "custard" they used on braniac was just cornstarch yes, but they did say it carried the same properties as custard and custard is definately a Non-Newtonian fluid so let's assume you can walk on custard.
Now I'm hungry