When energy storage reduces social welfare