Clean up unneeded intermediate variables in tests that should throw exceptions due to not-found entries