Fix-up type inference for function literals whose returns have been modified.
Merge pull request #4077 from ibuclaw/modifyret

Fix-up type inference for function literals whose returns have been modified