Changed calculation of maxProperties for the case when additionalProperties is set, maxProperties is undefined and PatternProperties is undefined.