Fix various bugs required to support `r-mut-int = &a mut i`