Fixes issue #572

Inlined the method. No other changes.