Implements #1298