Allow nested session.commit() so existing code can be integrated. Closes #1.