Python 3.8 (pre-release), 68 bytes
lambda c:(f:=lambda p,a=0:f(p[1:],eval(f'(a{c[p[0]]})'))if p else a) replaces the '=' operator with ':=' in order to utilize python 3.8+ walrus expressions
lambda c:(f:=lambda p,a=0:f(p[1:],eval(f'(a{c[p[0]]})'))if p else a) replaces the '=' operator with ':=' in order to utilize python 3.8+ walrus expressions