Const overwriting does not actually throw an error

Const overwriting is silently ignored.