Fixes to CTEProxy for Rails 4.1

Adds model name to CTEs

Fixes @(_)reflections