issue #21670: Check for model instead of index to avoid tripping on disc...

...ard/refresh routine.