fix Issue 13832 - delegates that return ref do not output correctly to .di file
Merge pull request #4201 from 9rnsr/fix13832

Issue 13832 - delegates that return ref do not output correctly to di file