Improve fix for GH-12512: JIT Assertion `info & (1 << type)' failed
Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)