Fixed access to uninit'd mem in repack_indexdef

If the tablespace is the last token in the indexdef, skip_ident returns a
pointer *after* the term zero, so garbage may end up after the statement.