Issue #2297307 by fgm: Prevent store type deletion when a store exists.