Fix get models patch

PR against the 3.0.x as requested because the monkey patching is being removed in develop. Fixes #3575