Implemented lub calculation deeper than 2 (in cases, when we don't need to prevent infinite recursion everything will look normal because of big enough depth, for infinite cases it will be 2).