Revert "unset ontology_id on setting state to failed"

This reverts commit 57eba7322d74ad38e54791f9a5aea29562bf2684.