Follows-up T202357.
It's still not as good as it could be. It seems the wrap() is particularly expensive. Fine if called rarely, but this is quite popular method. It also seems to be setting the same attribute multiple times, probably unintentionally.