Pass a non-`nullptr` `bmain` to `BKE_library_foreach_ID_link()` wherever that `bmain` is known at the call site. This will be used in a followup commit. This should not introduce any functional changes. Pull Request: https://projects.blender.org/blender/blender/pulls/123187