Added check on applyToBranches together with applyToSources [demos][skip hazardlib]
Added check on applyToBranches together with applyToSources [demos][skip hazardlib]


Former-commit-id: f9654a8133358cc7c3e2a269c4eb4f6c071a1b50
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine