Merging 4f4ced7a into 0.9.2. Fixes #593. Causes conflicts with double-used DB versions but those will be taken care of in 0.10.