Fixed some context cacheing issues in tests