fixed inferrer to handle nested list of structures

to support Quake example