Yes, the source database is scripted and created using DB Ghost.
I have created an empty test database with two functions:
CREATE FUNCTION F2 () RETURNS int
CREATE FUNCTION F1 ( @p1 int )
RETURNS @Result TABLE
insert into @Result select [dbo].[F2] ()
But good question. I've tested this problem again and the problem is the build task of DB Ghost. After build there are no references between F1 and F2, because they are created in alphabetical order.