SQL Compare Fails trying to CREATE function referencing a table it is creating later in script.

SQL Compare Fails trying to CREATE function referencing a table it is creating later in script.

Title says it all, SQL Compare Fails trying to CREATE a function referencing a table it is creating later in script. Why on earth would the order of operations be to add the function before creating a table it is referencing? Seems ridiculous. Is there an option to order the script correctly? Or do I have to do a sync of tables then follow up with another sync of functions?