Fixes COOK-2999 and FC044

Pull request #18 couldn't be merged automatically (due to conflicts).

Implement the change from #18, and also fix FC044 (bare attributes).