Compiler and static analyzer fixes from Peter Schorn.