Fixed incompatibility with custom tests in certain lessons. Code may be OK now, but don't count on it.