Fix storing capabilities through capabilities.

Reported by Jon Woodruff!