BUG: Bug fix in apply when using custom function and objects are not mutated (GH5545)
Merge pull request #5554 from jreback/apply_bug

BUG: Bug fix in apply when using custom function and objects are not mutated (GH5545)