Code question, inventory.contains

Yes, the inventory has a book, book & quill, and another enchanted book, so I think I am covered there.
I then found this post,

which basically says the same thing about the code being broken. I will try the latest release and see if that helps. The above test was with API 5.1.0, which I probably should have mentioned to begin with.