Chronology protection in anti-de Sitter