Fixes #1226, no idea how

This shouldn't work but it does. There may be an underlying bug this works around.