I don't think there's actually a way for the matchmaking server to tell if a group in an instance is engaged in battle or not. Doable perhaps but the DF system is already handing a shit ton of queries as it is.