Temporary fix for lifetime issues (same as rust-lang/rust#14302)