Attempt to fix crash when setting value of a file input element.