generator: fix extensions check