You literally replied to the reason for this on IRC a while ago with a comment on how horrendously broken this chain is, so guess what, I already fixed that part. ![]()
But still, as detailed above, just add a check for if the entire grid is empty with an early out, and everything should work.