How to find nodes with a scalar predicate having values found during traversal

I have a scenario where a value variable is not initialized and if it is used later db throws an error. Here is an example -

curl localhost:8080/query -XPOST -d '
{
  steve as var(func: allofterms(name@en, "Stesven")) {
    director.film {
      fn as name@en
    }
  }

  stevens(func: uid(steve)) {
    director.film @filter(eq(name@en, val(fn))){
      name@.
    }
  }
}' | python -m json.tool | less

Output

{
  "errors": [
    {
      "code": "ErrorInvalidRequest",
      "message": ": No value found for value variable \"fn\""
    }
  ],
  "data": null
}

How should we handle this scenario. It seems variable fn is not defined in this case.