Fix up a little bit of logic; add test.
Merge pull request #1 from adam-vessey/7.x-LBL-59

Fix up a little bit of logic; add test.