wx GUI: Reduce the creation of new IDs