fix Issue 12749 - Constructor-local function allows multiple mutation of immutable member