Implements #1269