Better exception when performance counter instance name limit is reached

Fixes #2352