Short version: a subimport-ed file has correct relative path when using \includegraphics, but incorrect relative path when using \includepdf.
Long version:
File a.tex is located in my main a directory 'a_dir'. It incorporates a file b.tex (which is located in directory 'a_dir/b_dir/') using '\subimport{b_dir/b.tex}'. b.tex includes a number of images, that are located in the directory 'a_dir/b_dir/images/'.
b.tex uses both the commands \includegraphics and \includepdf (the latter from the pdfpages package). When a.tex is compiled, the \includegraphics command works fine, but the \includepdf command looks for the images in the (non-existent) directory 'a_dir/images' - it is looking for them relative to a.tex, not b.tex!
I can't simply change the path in b.tex as I also compile that file on its own. How can I get pdfpages to look in the path relative to the file it is located, not the main compiling file?