Scale3Image, Scale9Image, TiledImage: updated to use new flatten() function signature