Implement cached rebundling, fixes #53