Merge "libtimeinstate: fix potential optimized variable" into main