fix maximum field value calculation in vector layer (addresses #7193)