libmid: fix regression from last commit