Fix bug in membership lookup.