Make isContainedWithinObject check for equality as well. Closes #1177