Unwrap unsafeDereference result, related to issue 6291