cw.lua.in: fix error detection on return from cw.wrap_child.