core: last_pair: Move to core.