* Clear AxisValueArray if it is empty after instantiating. Fixes #2562 * rearrange the code a bit for clarity