Backporting the reflection stuff

May wind up fixing this based on how this looks in 1.6.4... haven't
tried it yet.