Fix bugs in type resolution
Merge pull request #2030 from wmtan/ConditionsFixes

ROOT6 -- Fix bugs in type resolution in conditions code