Check for size=0 before setting item
This is a second try at fixing #10193; the first try is in #10194. There is some useful discussion in that PR, so I didn't want to clobber that- not sure of the etiquette of multiple PRs for the same bug??

The discussion around setting values in views on #10194 is separate from the bug itself- I find that setting an item on a newly-constructed empty series with a frequency (thus, no views are involved) raises the same error. 

I couldn't cherry pick from my old branch easily as some commits contained more code than is necessary for this set of changes, so I have done a new one.
