Fix for #2511
Merge branch 'next' of github.com:rethinkdb/rethinkdb into next