When loading a cached entity (in nonstrict mode) with a lazy formula field for the first time, NH compares the value of the field with LazyPropertyInitializer.UnfetchedProperty to determine whether or not the field has been initialized. But when using a serializing cache (eg, Redis), the comparison fails because the deserialized instance of UnfetchedLazyProperty does not equal that of the LazyPropertyInitializer.UnfetchedProperty property, and instead tries to set the value of the entity property to LazyPropertyInitializer.UnfetchedProperty, which fails with an invalid cast exception.