622a2a8df0
This is a follow up to #9129. This PR fixes some problematic `int` to `BOOL` conversions that might cause overflows when checking for bit flags.