Fixes #1148 -- optimize chaining internally