BIT-1283: Fix crash when using &encrypt.