compiler/libec: Fixed cast to derived class going through String conversion property