small codegen improvement in is() (use a gc root less often)