Fix nameless programs

* Use fi/sv/other name if available in names()
* Cleanup in markTrainingProgramsDeleted by marking as deleted if names still don't exist