Fix for bug 6950

Fix for bug 6950 - scala singleton handler now works for traits as well as classes