I meant to update this earlier, but it turns out that SQL Packager will split a SQL script over a certain size into batches (I'm not sure of the exact maximum size for a batch), but if the SQL in a single block is larger than the maximum size of the batch, then it will split the single block over multiple batches. This causes invalid batches to be created.
I have logged a bug for this which the developers are currently reviewing (SPA-509).
I am also having trouble with some dependencies, but so do the SQL Server itself, so if you are counting on SQL Servers dependency engine, some scripts will fail until I manually restructure the script...
SQL Packager uses its own dependency engine to work out the dependencies. What is getting scripted out of order in your example?