No test case because I couldn't reduce the huuuge test case. Fixes the problem discovered by @ifreund.