optional modifier fails

Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2094

Reported by Martin Nilsson, IDA nilsson@pike.ida.liu.se

The code

class MyFont {
  inherit Image.Font;

  optional string _sprintf() {
    return "MyFont";
  }
}

MyFont stuff() {
  return Image.Font();
}

fails with

bash-2.03$ /export/d1/nilsson/pike/7.2.166/bin/pike test.pike
test.pike:11:Wrong return type.
test.pike:11:Expected: object(implements 65585)
test.pike:11:Got     : object(is 65590)
test.pike:11:Missing identifier "_sprintf".
Pike: Failed to compile script:
Compilation failed.

bash-2.03$ /export/d1/nilsson/pike/7.3.11/bin/pike test.pike
test.pike:11:Wrong return type.
test.pike:11:Expected: { MyFont = object(implements 65601) }
test.pike:11:Got     : object(is 103)
test.pike:11:Missing identifier "_sprintf".
Pike: Failed to compile script:
Compilation failed.