make query() aware of the element select2 is attached to. fixes #561