[ftools] Fix "Polygon from layer extent" (#8074)