Moving code section insided if clause since it is only used inside that clause.
Moving code section insided if clause since it is only used inside that clause.

EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base,EricssonResearch/calvin-base