Fix "unknown reference: k" in erasure analysis

This patch makes the usage analysis remember names of de Bruijn variables to also cover the cases where a let-bound or a lambda-bound variable is referred to as `P _ n _`, not `V i`.

This should fix #1250. Since I can't reproduce it, it's hard to test. However, all the tests do pass.