restore declare() logic to prevent duplicate declarations