GROOVY-5883 + GROOVY-6270: ensure the result of a Closure#call is cast to the target type before boolean conversion plus regression test for both