This mimics the related call in SDAG. The caller is responsible for ensuring that undef values are propagated safely.