Fix Redis section flush when no keys are present. Fixes #1129.