lookup was always done on top level script instead of advancing to subclass each time. this commit changes the lookup to always be at last found subclass