core: fix inferencer bug with flow prog with some type args but not all