Handle edge case where last character is escaped.