Fix accessing protected properties from castGetterSample