Modified to work with the trunk's hash_search() optimization.