Upstream merge: Fix ender crystal stack overflow