Const

Fixes #7426

(replaces #7484)