core: fix boxing of boolean primop results