There is code in stapbpf to handle the case when some cpu cores are disabled. However, certain things in stapbpf.cxx are still hardcoded to cpu0 (e.g. perf group fd). If cpu0 is disabled, stapbpf doesn't work.
Strictly speaking cpu0 is not always safe or possible to disable. But I was able to do so on a test vm, so the fix has been committed just in case. (As usual, before the fix stapbpf's error message is based on a failing syscall return code, which fails to reveal the reason why things don't work.)