Tests for getPaths for selector and fix for a bug these tests caught