Merge pull request #1394 from VZout/patch-3

Fix execution order of `encodeBindings` for `bufferBindings`