Fix NPE in SnapshotsService on node shutdown

Fixes #6506