Merge remote branch 'trond/bugfixes' into for-2.6.37

Without some client-side fixes, server testing is currently difficult.