fix Issue 9974 - immutable class constructor is broken
Merge pull request #1918 from 9rnsr/fix9974

Issue 9974 - immutable class constructor is broken