fix #8277, missed variable update inside try block

the fix is to propagate isVolatile correctly in codegen