Add more support for #weak!. Fixes #344