Implements #869