It is not uncommon to have databases with a Compatibility Level that does not match the version of SQL Server they are running on. When you upgrade a SQL Server installation the databases retain a Compatibility Level that matches the version you upgraded from. The same applies to restoring or attaching databases from an earlier version.
I can think of a few different cases that will result in the recursion of a CTE (Common Table Expression) in SQL Server coming to an end:
Service Pack 1 for SQL Server 2008 has been released and is available for download. The service pack offers very little in the way of features, but is instead comprised of a rollup of cumulative updates and bug fixes. There is a note on the download page that seems like it was put there to address the disappointment that may be felt by those looking for new features:
You may have noticed that after renaming a computer running SQL Server that the value returned for
@@SERVERNAME has not been updated. It returns the computer name as it was during installation of SQL Server. The
SERVERPROPERTY function does take into consideration changes made to the computer name when the
ServerName property is requested.