This fix was made by @coreyhaines on docrails and merged in master. Cleanly cherry picking into 3-2-stable wasn't possible.