makeFields alternative prefix-computation algorithm

Fixes #510 . Would be reeeally cool if you could cherry-pick it under 4.6 somehow also. Thanks!