Implements #1162