Fix as_real and as_logical after changes in complex model_of