Para citar servidor HTTP nginx , quarta edição (publicação Packt):
You might wonder: What are the advantages of using a
locationblock over anifblock? (...) [T]he main difference lies within the directives that can be employed within either block. Some can be inserted in anifblock, and some can't; on the contrary, almost all directives are authorized within alocationblock.
Portanto, receio que try_files seja uma daquelas diretivas permitidas em um bloco location , mas não em um bloco if .
Quanto a como resolver esse problema e fazer o que você quer fazer, eu não (ainda) tenho uma resposta para isso.