Merge changes from orig nanoc (up to fa514b0681f6c9b73eb28a66fa27bee71b15e9a1)