Add test for bug 4592: dict_scan misses