Found by metze. Patch in master, needs to be applied to 3.6.1.
Arg. Invalid bug (sorry). Codepaths have diverged here between v3-6-test and master (Metze!!!!!). Jeremy.