adjust scope FSM for subtle function declarator transitions