Functions defined at the top of the file or below a class with nothing in between would not show in the Function List. This changes the function regex to fix this. A small unit test that the old regex won't pass but the new will included. Close #9844