fix 'exists?' for https://github.com/rails/rails/issues/633