Water and lava cans charge bug

Water and lava cans has sometimes a bug, here it gets charged full at putting last water source or filling last lava source in it.

EDIT: How do I remove the old, already accepted commits out?!