Fix a levitator crash. Avoid foreach in hot paths.