Added frozen attribute to state objects passed to custom rules.