added transform_within_instance

ensures that all touches occurred within the instance element
Merge pull request #455 from lloiser/transform

added transform_within_instance