Issue 11785 - Order of method/function declarations has an effect on compilation result

https://d.puremagic.com/issues/show_bug.cgi?id=11785