Fix a false negative with reference in conditional in UselessAssignment

This fixes #475.

I'm not updating the changelog since the new `UselessAssignment` is not yet officially released.