overviewer/Minecraft-Overviewer — comment on commit 8b55203d41b73922ffdaaf97d2ff787c627c2b57
File: overviewer_core/src/rendermode-normal.c line 152
By agrif:

This function is called more than once per block on some render modes, in particular lighting mode uses it to see whether it should shade a particular face (so, 3 extra calls per block, not all in the same x,y position).

Putting it somewhere else results in those weird lighting errors you had.