Issue 141: some duplicated code due to copy-and-paste slip-ups.