BasicObject can refer to BasicObject from within itself.

Fixed #2828.