STS-3102: fixed the way the type hierarchy cache is flushed, happens now before each build