Hacky sub-expression implementation for lightncandy

Change-Id: I2cfba1a1750dda8ff4e7ff9480c67e5e027ec36d
Merge "Hacky sub-expression implementation for lightncandy" into frontend-rewrite