Implements #1290
Initial version of #1290
Merge pull request #1291 from emmanuel-keller/1.5

Implements #1290