Fix obvious bug in Surface.isMask. Corrected unittest in Allocator.Type.