es_out: fix regression when replacing program