Fix bug causing duplicate packageinstances to be submitting a job (using form) with an exisiting packageinstance.