Fix setting model data without an active context