pointQuery first returns invalid instance of Shape

Signed-off-by: Shuja Shabandri <shuja@shabandri.com>
Merge pull request #2584 from smshuja/master

fixed #2179: pointQueryFirst returns invalid Shape when a shape is not found.