Avoid partial name matching for axes and legends. Fixes #269