Fix bug in register multiple

When auto registering multiple implementations the first implementation would be registered twice.