I ran into this same exact bug on the mobile version (0.9.067-PUBLIC-ANDROID#3772) (I'm not sure if this is the JavaScript version, please let me know if it is). I managed to figure out how to replicate it consistently:
I open up my ship's storage, which has x150 Power Potions and x150 Focus...