Don't check distance for entities in different worlds. Possible fix for #2885.