My guess is if Merrifield had left early, his out would be considered the third out of the inning since it took place before Soler was doubled off. At least that's how I think it would be officially scored, the decisions by official scorers leaving me scratching my head sometimes.
When a batter reaches base because of a passed ball on a strikeout, he is still scored with a K, which is an out, even though he is on base. So the out doesn't count for the inning, but it does count for the batter's hitting record and the pitcher's strikeout record. Such a simple game can be awfully confusing at times.
I actually knew this before I wrote it, but there would actually be three credited outs in the inning, and only the assists and putouts would stay in the book (Rule 7.10). The pitcher would only be credited with a three-out inning, and Merrifield but not Soler would be called out. Some day it will happen.