Changed behavior of dict_lookup_grep so that it returns value of function