There is also other trickery since imshp and kshp are massaged according to padding and other factors that just confuse the issue.  I am open to revisiting this in a later PR, but it might take a while (as in maybe another day, just for that).