Minor cleanup in XPM image loader