Fix #1420 - regression with degenerate log ticks.

Commit 59554738 broke the check for a degenerate domain; this restores the original check and adds a test to verify this behavior.