Rearrange things to get around a bug in gcc-4.6