SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlag

Rebase of #2315.