SERVER-14180 fix double free in access planning for $elemMatch