Ancestry bug with acts_as_list

@swanandp I've made a working solution for my issue described in #131 

I've used ancestry gem to reproduce the issue. The fix make all tests (including mine) passing so it should be good to merge.

Let me know what do you think.