Incorporate code review feedback (fixes #1428).