Trac 28709 kienstra

Merges #38.
Amends #29.

/cc @kienstra