Handle ? in hash case.

Fixes #8458