expectSchema: make sure to call fn only once

We need to make a fake "fn" to pass to the original assert() here, since
assert() is going to call that function and we don't know whether it did
or not.

Before, the code might have called fn() twice, once in the original
assert() and once in expectSchema(), resulting in messed up error
reporting.