Before this patch the path to the default profile database was once read and then written in the config. And as long as this file exists this value would be used. But if the user changes the default profile in Firefox the old profile will still be used (as long as it is not deleted).
And the default profile was also not always correctly extracted (this configuration got only edited in the about:profiles page in Firefox):