On Realizing Planning Programs in Domains with Dead-End States