I think we should add a unit test that makes sure this works OK.