The ledger templates in
Baker are the result of following the instructions from the book. Isn't the correct analogue to the API code the instruction book rather than the resulting ledger templates?
Baker says that if you write a book that contains instructions on how to do something, you might own the copyright to that book, but your copyright doesn't extend to the results of other people following your instructions and creating their own versions of that thing. In the actual case it happened to be ledger templates, but it could have been anything else.
For example, if you write a book that describes in detail how to draw an owl, you own the copyright to that book. If I buy your book and then follow your instructions to draw my own owl, I own the copyright to that drawing, not you. Your copyright over your book doesn't also grant you the copyright to my owl drawing just because I followed your instructions.
If Oracle was only alleging that Google's implementation of Java (their version of the ledger templates/owl drawing) infringed on Oracle's copyright of its Java API (the instruction book), I could see how the reasoning in Baker might apply. But here they're alleging something further: that the API (instruction book) itself has been copied.