Improve new hit-testing test.
Take #visible state into account when hit-testing.

Closes #243.