Fix a bug in expr_len_detection