Prevent divide by zero when normalizing a constant image