Fixed bug in GetInstanceName for a nested context