Don't use variables outside of their scope
Assertions to quiet clang scan