As far as I know, both objects would be triggered if they were overlapping, unless you wrote a line of code in to control for the Z order (object a's Z order = greater than object b's z order; on touched = set state to XYZ)
You can do the same sort of check for object visibility.