[Resolver] Don't include `nil` results.

Fixes #2733.