This reverts commit dd260245ec.
The commit fixed the compilation problem but according to upstream
causes new problems because of the huge data structures on the stack.
Upstream provided a better patch which will be applied next.
(cherry picked from commit 68bd237061)