Quite right - that fixes the issue I was getting. Hooray for code inspections!