Fix name-resolver use to avoid warning.

Fixes PR 14725.