The attached wasm validates, but after conversion to text it becomes invalid,
$ bin/wasm-opt -all a.wasm --print > a.wat
warning: no output file specified, not emitting output
$ bin/wasm-opt -all a.wat
[wasm-validator error in function 0] function body type must match, if function returns, on
(ref.func $0)
Fatal: error validating input
a.wasm.gz
cc @tlively