Fix a traceback when creating a gaptab