Handle resource-only attributes correctly.

Fixes #14.