Fix bounds rotation logic am: 781240d9bb am: 7778de938a
am: 255bc6a4af  -s ours

Change-Id: I70e9077e81e6449656a57194afea2a4a1a1904ee