Since you are mainly concerned about not breaking existing code, another possibility is to leave the
list_dir behavior as-is and create a new function with a different name, such as
list_dir_recurse. The new function will apply the pattern to all files as originally intended.
Make sure to add plenty of explanations in the POD to distinguish the new function from the old one.