fixes: issue #266 Override generation bug before a static function