Fix for broken selectData across many-to-many joins