This doesn't completely fix the issue, but provides a workaround for #1414 (closed) and #1339 (closed).