How to define %category% for custom taxonomies?

This will probably be easier to do when the following filter lands:

http://core.trac.wordpress.org/ticket/18752

Update July 16. 2012: Fixed.

error code: 523