[ftools] fix polygon from layer extent tool:
with the "Calculate extent for each feature separately" option ticked, it generates a python error.