For some reason the upgrade did not set the application group for the Main Subsite correctly causing the problem with the directory.
On a base install of OpenACS 5.1 the application group for the Main Subsite is Registered Users. On the upgrade a new group called Main Site Parties was created.