Fixed issue with updating an element's dashstyle programmatically. Closes #874.