singleton class needs to set __outer__; fixed #1983