Improved creation of midpoints cache in PTable.