Minor fix to the len == 0 optimization