Some of the weird things I see are perhaps the consequence of running Emacs in place from the build tree. It is assumed that normal users have write access to native-lisp/VERSION-xxxxxxxx/, but not to native-lisp/VERSION-xxxxxxx/preloaded? The function already deletes any *.eln file in a stale native VERSION-xxxxxxx directory, just not the ones in preload/