SetObjectiveVisible() should affect the visibility of the quest in the interface; perhaps if the second parameter is nil, something might be displayed incorrectly. Also, there's a possibility that quests of the KIND_DEFEAT_HERO type cannot be processed by the script. According to Jack_of_Shadows' guide, KIND_MANUAL is required for this. But I'm not sure about that.
That's the thing, I don't have nil there. I changed it to KIND_MANUAL, but it didn't produce any results.