title: try_files always returns 404 with variable
body: <p>The <code>try_files</code> directive seem to always fail for me:</p>
  
  <pre><code>...
  
  root /images;
  
  location /media {
      set $do_resize $uri;
      # if ?resize=blah query present, rewrites do_resize to small/$uri
      if ($arg_resize != '') {
          set $do_resize 'small/${do_resize}';
      }
      try_files $do_resize $do_resize/ @fallback;
  }
  
  # placeholder for image resize server
  location @fallback {
      add_header Content-Type text/html;
      return 200 "not found :/";
  }
  </code></pre>
  
  <p>My folder structure:</p>
  
  <pre><code>| images
      | test.jpeg
      | small
          test.jpeg
  </code></pre>
  
  <p>When requesting to <code>http://foo/media/test.jpeg</code>, it returns the image correctly. but when requesting <code>http://foo/media/test.jpeg?resize=blah</code>, it returns 404 not found. It should return the <code>test.jpeg</code> image inside the <code>small</code> folder.</p>
  
  <p>Is it possible to <code>try_files</code> with a custom variable at all? I've never seen something else besides <code>$uri</code> being used for the <code>try_files</code> directive.</p>