This is a bug, please make a bug report about it, and include exact steps to reproduce/a file to reproduce the issue with.
The easiest way to make a bug report is to:
- Open Blender
- Select from the top of Blender
Help -> Report a bug
- Fill out all the relevant information (mainly the steps to reproduce section)