Without this, the underlying device would get freed (and hence fail). (cherry picked from commit e04468de)