Add #f as a special case for hash-ref, fix hash-ref!.

Closes PR 14158.

Merge to 6.0.