[CGP] Reimplement r255055 a different way