Did you try a getrawtransaction on the hash to see if it was in the mempool? It wouldn't be rejecting it because the inputs were already spent, it'd be rejecting it as a duplicate.
Bingo! Many thanks for your help - this was being caused by a loop in my code which went awry and tried submitting the same transaction multiple times
For anyone wondering how to get the hash of a transaction (and therefore TXID) before its been submitted, you can simply call decoderawtransaction on the signed transaction.