fix #498

Note:

The effect of this fix is that if a metadata field is disabled and an
image is refreshed, that field in the database will be insured to be
NULL.