[checkmk-commits] Extracted helper function to untie variable scopes