[io-layer] Fixed error condition in _wapi_handle_struct_size.