Miri: undefined behavior of using a `*const _ as *mut _` pointer

Related: Inconsistency between stacked borrows and my mental model