Revert to using LENGTH instead of LEN

Based on some performance experiments done by Anthony.
This partially reverts aeb5670.