to not need the extra flag you've talked about you can remove lines 128 and 129 and change the for to:

```java
for (int i = 0; i < path.length; i++) {
    Field field = reflectField(path[i], type);
    if (field == null) break;
    if (i < path.length - 1) type = getActualType(field.getGenericType());
}
```