After further investigation, it appears that this error is the result of a bug in rails 4.0.x that leads to the the default_scope being called twice. I posted the problem on github here:
https://github.com/rails/rails/issues/14351
Credit needs to go out to Larry Reid for his fantastic help with this problem.