When the custom email script adds attachments to the mail it creates, in some places it gets the list of attachments from the AttachmentManager, and in others uses the getAttachments() method of the issue object in the bindings. The problem with the latter method is that its results can fall out-of-date with those from AttachmentManager, and so newly-added attachments (e.g. as part of the same workflow transition) may not be present there. This is specifically troublesome because there are points where the script tries to pick out elements of the list from getAttachments() based on the elements of the list from AttachmentManager: since the latter list may contain elements that the former lacks, this can produce null results that are not checked for and thus lead to NPEs later on.
For consistency and freshness' sake, therefore, we should use AttachmentManager wherever possible.