Remove extra extensions

This removes the superfluous extensions when we already have the `primary_extension`.