Fix the conversion of Scope objects to bool