Your assumption is correct, the reason for this index getting added is that the old agent is still registered with the server and has not timed out yet. I have seen this happening at a number of customers, the easy fix is to turn of them automatic adding of an index. Check the documentation for the collector setting - https://apmcommunity.compuware.com/community/display/DOCDT55/Unique+Agent+Names+with+Index
how are you shutting down the JVM/Agent. If it is shut down properly it should also unregister properly and thus no "indexed" new agent should be registered. However if you just kill the JVM this can happen and the "old" agent needs to timeout on the server to avoid a indexed name.
we are using an automatic procedure, which kills the process, when it doesn't come down in three minutes.
When I got things right, we have a few possibilites:
For #3 you don't have to worry because the startup instrumentation will still occur without a license, and once it does acquire a license (i.e. when the old agent times out after a moment) it will work as expected.
I think your best options are #1 and #3 together. As Richard stated reconnecting the agent will seamlessly replace the old (dead) agent.
A hard-kill should IMO always be avoided if possible. I think the timeout is 1 minute for #2.