How to specify that two functions must be placed in the same overlay