I agree it would be better to allow forward references for nested functions, I just wished to point out that the current behavior is not a bug, it was built that way.