Made completion membership checking not rely on an array search