KT-4119: Back-end (JVM) Internal error on code with local extensions

  #KT-4119 Fixed