better 'am I in a join context?' logic