Fix within bug.

The within problem that was commented out now works properly with
proper refactoring.
Merge branch 'gmaster' into dev