added test to try and reproduce #986