Please help compiler error "Error: Bad name index -1/534"

Can’t say that it fixed the problem since I had to delete some assets, but seeing where error was appearing in the log, I saw it was around some assets, levels and foliage, so I deleted the whole level files and it compiled.