Fixes #3280: Support dynamically attaching anonymous behaviors