Fix bug in DialogStateManager
@@ -290,7 +290,10 @@ class DialogStateManager:
# TODO: HACK to support .First() retrieval on turn.recognized.entities.foo, replace with Expressions once
# expressions ship
first = ".FIRST()"
+ try:
i_first = path.upper().rindex(first)
+ except ValueError:
+ i_first = -1
if i_first >= 0:
remaining_path = path[i_first + len(first) :]
path = path[0:i_first]
