Sortable with dynamic containment doesn't reset

Sortable with dynamic containment doesn't reset

In the following jsFiddle, I have a sortable table with some items that must remain in the table and others that can be dragged out (to a connected table - in the real application - omitted here for simplicity).  The helper option is set to a function that examines the row as the drag begins and sets the containment option appropriately.  For the most part, this works.


Following the instructions above the table, you will see that the "uncontained" rows can initially be dragged outside the table, but are no longer allowed out after you drag the "contained" row.

Looking at the _mouseStart and _setContainment methods in sortable, it's fairly clear why this happens, as the containment is only updated if the containment option is not false, so setting it to false after it has been something else will not trigger a reset.  Looking at the equivalent code in draggable, it appears that such a reset would succeed.

Am I correct that this is not intended behavior, and therefore a bug?  If so, I'll be glad to submit a pull request with a patch.  Thanks!

-Brandon :)