Synr 694

This is the follow-up to the last code review, plus a needed change to build under R 2.15