bsp: fix another nested function