title: Swift 4: Escaping closures can only capture inout parameters explicitly by value
body: <p>I have been migrating my code from Swift 2 to Swift 4. I have the following code that worked fine in Swift 2:</p>
  
  <pre><code>func fetchUserThumbnailAvatar(_ task : inout URLSessionTask?, completion : @escaping (_ image : UIImage?) -&gt; ()) {
      fetchUserAvatar(Session.currentUser?.avatar?.thumbnailURL as URL? ?? URL(string:"")!, externalUrl: URL(string: thumbnailAvatar) ?? URL(string:"")!, &amp;task, completion: completion)
  }
  
  fileprivate func fetchUserAvatar(_ internalUrl : URL, externalUrl : URL,_ task : inout URLSessionTask?, completion : @escaping (_ image : UIImage?) -&gt; ()) {
      fetchImage(externalUrl, task: &amp;task, completion: { image in
          if image == nil {
              self.fetchImage(internalUrl, task: &amp;task, completion: completion)
          } else {
              self.cache.removeObject(forKey: (internalUrl.path as AnyObject?)! )
              completion(image)
          }
      })
  }
  </code></pre>
  
  <p>However, after the conversion I get the following error:</p>
  
  <blockquote>
    <p>Escaping closures can only capture inout parameters explicitly by value</p>
  </blockquote>
  
  <p>at line:</p>
  
  <pre><code>if image == nil {
              self.fetchImage(internalUrl, task: &amp;task, completion: completion)
          }
  </code></pre>
  
  <p>It would be great if someone could help me. Thanks.</p>