Permafrost thaw in a nested groundwater-flow system