Test and fix for failing to start transaction in MasterImpl.

(cherry picked from commit b453f98dba1e5bcb8e19d5f5f2efcc68eb09c75a)