made CheckAssert::inSameScope static to silence cppcheck warning