Fix a typo: ai should have been a.

Cherry-picked from master to 1.5:

commit 42fb0b6bc959959cb0b5aadc0894be98b77c8709
Author: Roland C. Dowdeswell <elric@imrryr.org>

Fix a typo: ai should have been a.