Add stuff for object shadowing and fix a constness