Discovery helps explain why solid-state batteries often fail