Fixed a bug in the validate_image function

The _validate_common method should only be called once mmmagic has invoked the callback