Thanks,
I've managed to narrow the problem down to samba - it has perl at sysroot/dest-dir/usr/lib/perl5.
However for the life of me I can't figure out how to force it to run after the actual Perl recipe. I've tried adding DEPENDS += "perl" in a .bbappend file (which bitbake-layers show-appends recognizes) and just directly editing the recipe.
Neither seem to make it stick. The first run right after the change works (since it's able to use the cached perl, and waits to rebuild samba) but subsequent runs (once samba is in the cache) always fail.
For now I'm working around it by manually purging samba from the cache after each run, but it would be nice to solve this properly at some point as well.
If anyone has any tips on where to look next to force the build order, that would be great.

Thanks,

Valen