Fix TypeError seen in older vim versions