This happens a fair bit. Any time you trigger an altitude capture with an instantaneous rate-of-climb which is not sustainable, if the aeroplane follows the path it will trade speed for height. An A330 was lost at Toulouse because of pretty much that...