Overloading of variables with constants causes run-time error when it ought to be possible to detect at compile-time

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

Reported by @grubba

class A
{
  string a = "foo";
}

class B
{
  inherit A;
  constant a = "bar";
}

int main(int argc, array(string) argv)
{
  werror("a\n");
  object a = A();
  werror("b\n");
  a = B();
  werror("c\n");
  return 0;
}

$ pike foo.pike
a
b
Cannot assign functions or constants.
foo.pike:3: __INIT()
foo.pike:10: __INIT()
foo.pike: B()
foo.pike:17: main(1,({"/home/grubba/foo.pike"}))