Fix bug in circular singleton creation detection