fix Issue 9974 - immutable class constructor is broken