Shallow slab detachment as a transient source of heat at midlithospheric depths