aes: Non-CC lua compatibility
Corrected (double) off-by-one