Move hash_len earlier to avoid backtrace