Allow boolean attributes.
Add a regression test for invert().  Closes #56.  See #28.