Implements #1290