sdag: fix bug generating references in SDAG entry methods