Protect against nested Rust tasks