Add component sorting to _interpolateComponents function.