create 4 jobs for suspend(new shell, only 4 jobs), use jobs command you can see the 4 jobs, but when you try to query on the last jobs(i.e jobs %4), it will have "no such job" error. The reason is getjob only looking for (num < njobs), njobs is the allocated jobs(in my case is 4). The fix is use if (num <= njobs) in getjob for looking the last jobs.
Fixed in git, thanks!