boolean-support: fix bug and add test