Okay, I found it. It's called Baptisia austalis, or False Indigo - a perennial they say is a good substitute for lupins, so Philip, you were on the right track. Thanks everyone. Some of the images I've just found for it show much less flower and a whole lot more leaves, but these are much more like lupins, with sweetpea type flowers. Very pretty if you need something for a sunny garden.