@Denis, thank you for the sample project so I could test this. It was immediately obvious what the issue was. There are two issues at play here. One is with kicad which I have already fixed. The other is with how you have defined nested sheets in your schematic. For example, in the root sheet you have a sheet named "DI16" which references schematic "building-blocks/DI16.sch". Once you enter that sheet, all subsequent sheet file paths are relative (assuming you used a relative path in the sheet file name) to the project path plus "/building-blocks". Inside sheet "DT16" you have 16 sub-sheets all referencing the same sheet file "building-blocks/Digital_Input_Iosl.sch". The problem is that they all are already referencing the "/building-blocks" path". When this gets appended to "project/path/building-blocks", the final path will end up being "project/path/building-blocks/building-blocks" which is wrong. For all nested sheets in a sheet that already references the "/building-blocks" path, you should not include another schematic file sub-path because the path hierarchy already references this path. The easiest way to think of it is to think about is is like walking up and down a directory tree. If this worked in the past, it was by shear dumb luck. I suppose I'm going to have to face the music for this when version 5 is released.
@Denis, thank you for the sample project so I could test this. It was immediately obvious what the issue was. There are two issues at play here. One is with kicad which I have already fixed. The other is with how you have defined nested sheets in your schematic. For example, in the root sheet you have a sheet named "DI16" which references schematic "building- blocks/ DI16.sch" . Once you enter that sheet, all subsequent sheet file paths are relative (assuming you used a relative path in the sheet file name) to the project path plus "/building-blocks". Inside sheet "DT16" you have 16 sub-sheets all referencing the same sheet file "building- blocks/ Digital_ Input_Iosl. sch". The problem is that they all are already referencing the "/building-blocks" path". When this gets appended to "project/ path/building- blocks" , the final path will end up being "project/ path/building- blocks/ building- blocks" which is wrong. For all nested sheets in a sheet that already references the "/building-blocks" path, you should not include another schematic file sub-path because the path hierarchy already references this path. The easiest way to think of it is to think about is is like walking up and down a directory tree. If this worked in the past, it was by shear dumb luck. I suppose I'm going to have to face the music for this when version 5 is released.