Hi Francis,
Thanks for your thoughtful entry. It seems that it is a cloudy area of buggy 'if' behaviors :)
I've created empty host config with just 'location /' and 'if ... add_header' and proxy_pass - and it works fine.
I'll have to retest this situation on my real server though to find out if my 'issue' is gone.
As for the second case - yes, it looks like the whole set of http://wiki.nginx.org/IfIsEvil#Examples so I think that's the case of buggy behavior too.
I'll try the 'What to do instead' section. But, funny to notice, in my case try_files *does* work, while 'if' does not in the same location.
Config of Nginx for Drupal is here: http://wiki.nginx.org/Drupal
I'm using it literally from there, just trying to add a buggy 'if' here and there.