Fix for mssql with jruby/activerecord-jdbc-adapter

Fix for the following error with mssql with jruby/activerecord-jdbc-adapter:
ActiveRecord::StatementInvalid: ActiveRecord::JDBCError: No column was specified for column 3 of 't'.: SELECT t.* FROM ( SELECT ROW_NUMBER() OVER(ORDER BY MIN(users.id)) AS _row_num, [users].[lft], COUNT([users].[lft]) FROM [users]  GROUP BY [users].[lft] HAVING COUNT([users].[lft]) > 1 ) AS t WHERE t._row_num BETWEEN 1 AND 1