Optimizer: push restrict over unwrap when possible.