cupid: Fix indexing of STC shapes in JSA catalogues

This bug caused findclumps to store each STC shape in an adjacent row of
the JSA table insead of the correct row. A floating exception occurred if
the table contained only one row.