codegen: fix i32-i64 conflict in cons length calc