hg import of git patches with -p didn't work. Trying to find out what was going on and fixing it I ended up with these patches. I guess they could go to stable, but there has been some refactorings in main, so applying it directly in main avoids merging trouble. These patches should not collide with Auguies mem-patching patches. /Mads