flatten the source to avoid making the changes to the path