Aha! The NotesDocument class has a method called Encrypt().
You can't use extended syntax notation for an item that has the same name as a method of the NotesDocument class. The compiler always gives priority to the class definition. So you will need to use something like this:
encryptFlag = doc.getItemValue("Encrypt")
if doc.hasItem("Encrypt") & encryptFlag(0) = "1" then
Duh! I should have noticed the conflict sooner.