Some fixes dealing with local decls.