[mach-o] Fix so that mach-o semantic errors return an error rather than assert