Fix AIOOBE when completion started on empty file