Use smart element pointer instead of weak reference to fix the IDEA-160333 Override...