generate_sbm(): fix bug when B=1

6 jobs for master in 235 minutes and 31 seconds (queued for 71 minutes and 2 seconds)
Status Job ID Name Coverage
  Test
passed #2249
amd64
job_clang_amd64

03:08:29

passed #2253
amd64
job_clang_amd64_nosh

03:07:23

passed #2251
amd64
job_clang_py2_amd64

03:09:41

passed #2248
amd64
job_gcc_amd64

02:17:36

passed #2252
amd64
job_gcc_amd64_nosh

02:21:03

passed #2250
amd64
job_gcc_py2_amd64

02:18:38