Improve error when passing a jQuery object to UI.insert

Also add a test for this behavior