Fixed dequeueBuffer hack for newer counting syntax

Change-Id: I1159ec42744b44f21b0c9c9a02a301f9f60170d7