Fix incorrect variable name in the auto-discovery script.

Refs #6008