Carl,
Very interesting. The server I tested this on has only a default instance.
I wonder if this is connected to what Caine posted, where it is implied that SSMS is always looking in the registry for the default instance. This would seem to provide the results that you are seeing - assuming that if a null is returned, then it defaults to the location of the master db.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes