Selected fixes discovered during lens-0.3 branch development.