Fixed performance regression #SCL-7464 Fixed
(cherry picked from commit c38035a)
Hack to avoid infinite loop for cyclic type aliases. Imagine situation that there is no type alias definition with recursion depth more than 100, then this hack just removes cyclic type aliases cases. #SCL-6880 Fixed
(cherry picked from commit 7501c79)
Fixed regression after the last fix. Now code is even less perfect, because of one more weird parameter, when infer type according to expected type, we can infer type parameters or not. We need to do it, when search implicit parameters for another implicit parameters, but we don't need to do it in other cases.
(cherry picked from commit fdf3bad)