find_subfiles: fix unintended modification of global filename