I think I made a method to detect something similar to this with a previous checkin, I'll see if I can find it and incorporate it.