cppcheck: fix variableScope in opentxs-core