It's actually generic and I have written a commit that covered all these hardcoded cases.   It got a bit messy.  Will probably introduce it back.