Fix for function return value speculation

- a speculated function is now marked as returning a value if it is called as such at any point before its definition
- no unwarranted errors about missing return values are raised for speculated functions anymore