Implements #1077