Fix some issues with RVM mixed mode support.

Closes GH-1121.