Fix error handling in fillSpecialObject (forky version).