avoid excess memory usage in cust_main location upgrade, #28841