The patch is built from [durran's fix for the original issue in mongoid](https://github.com/mongoid/mongoid/commit/b78e7a9286330b3223d000073ee9e8e1eb5790bc), the duplicate call is intentional according to the commit. I agree it's not apparent why he does this.