std: Make vec::from_elem failure-safe