This seems like a discrepancy between an account that has multiple possible default folders and newer accounts that have only one root.
get_default_folder()[1, ] is necessary for accounts that have multiple accounts, because the api will return a list.
get_default_folder() will return a plain int in all other cases I'm aware of.
Proposed solution: fixget_default_folder() to return version A if available, otherwise B.