IDEA-108291 check read-only status while introduce variable