Fix value size encoding for compatibility with new VM