Improved rules for autostubbing.