matlab2017+ library mdl files containing $bdroot instead of filename
Mdl files written using matlab2017 and later has the filename replaced with $bdroot for library files in the case where one library part uses another defined at the top level of the same library file. This causes RCG build to give the error:
Can't find $bdroot.mdl
For example, psl/common/models/psliss.mdl has three library parts defined at the top level: ISS, secondloop and thirdloop. Secondloop and thirdloop are used by the ISS part. The mdl file gives these parts the path $bdroot/secondloop instead of psliss/secondloop (ditto for thirdloop).