Add spec to demonstrate #1371, and a fix