title: StackOverflowError using Singleton in Kotlin
body: <p>Can anyone tell, why I'm getting a <code>java.lang.StackOverflowError</code> using this Kotlin class? Line 41 is <code>if (instance == null) {</code></p>
  
  <pre><code>class TokenHelper protected constructor() {
      var token: String? = null
      var appId: String? = null
      var installationId: String? = null
      var userId: String? = null
  
      companion object {
          var instance: TokenHelper? = null
              get() {
                  if (instance == null) {
                      instance = TokenHelper()
                  }
                  return instance
              }
      }
  }
  </code></pre>
  
  <p>Stacktrace:</p>
  
  <pre><code>04-11 19:07:42.188 16142-16142/com.foo.bar.debug E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.foo.bar.debug, PID: 16142
    java.lang.StackOverflowError: stack size 8MB
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:0)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
        at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
      at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41
  04-11 19:07:42.271 16142-16142/com.foo.bar.debug D/Error: ERR: exClass=java.lang.StackOverflowError
  04-11 19:07:42.271 16142-16142/com.foo.bar.debug D/Error: ERR: exMsg=stack size 8MB
  04-11 19:07:42.271 16142-16142/com.foo.bar.debug D/Error: ERR: file=TokenHelper.kt
  04-11 19:07:42.271 16142-16142/com.foo.bar.debug D/Error: ERR: class=com.foo.bar.helper.TokenHelper$Companion
  04-11 19:07:42.271 16142-16142/com.foo.bar.debug D/Error: ERR: method=getInstance line=0
  04-11 19:07:42.282 16142-16142/com.foo.bar.debug D/Error: ERR: stack=java.lang.StackOverflowError: stack size 8MB
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:0)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
    at com.foo.bar.helper.TokenHelper$Companion.getInstance(TokenHelper.kt:41)
      at com.foo.bar.helper.TokenHelper$Companion.getInstance(
  04-11 19:07:42.283 16142-16142/com.foo.bar.debug D/Error: ERR: TOTAL BYTES WRITTEN: 880768
  04-11 19:07:45.527 16142-16142/com.foo.bar.debug D/Process: killProcess, pid=16142
  04-11 19:07:45.528 16142-16142/com.foo.bar.debug D/Process: com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException:113 java.lang.ThreadGroup.uncaughtException:693 java.lang.ThreadGroup.uncaughtException:690 
  </code></pre>
  
  <p>Android Studio 2.0, Kotlin 1.0.1-2</p>