The attached file reproduces the issue. Even though class foo is not shared, both forms of is expressions report that it is
Created attachment 406 [details] file demonstrating issue
Related SVN revision: http://www.dsource.org/projects/dmd/changeset/223
Fixed dmd 2.036